{layout name="macplus/layout" /}
<div class="playWarp">
    <div class="container">
        <div class="row">
            <div class="col-lg-1 col-xs-1 macplus-top-0">
                <div class="macplus-player__item clearfix">
                    <div class="col-lg-wide-75 col-xs-1 macplus-top-1 padding-0">
                        <div class="macplus-player__switch"><span class="btn_switch_bg"></span><i
                                class="icon_sm icon_left_sm"></i><i class="icon_sm icon_right_sm"></i></div>
                        <div class="macplus-player__video embed-responsive embed-responsive-16by9">

                            <style>
                                .MacPlayer {
                                    background: #000000;
                                    font-size: 14px;
                                    color: #F6F6F6;
                                    margin: 0px;
                                    padding: 0px;
                                    position: relative;
                                    overflow: hidden;
                                    width: 100%;
                                    height: 100%;
                                    min-height: 100px;
                                }

                                .MacPlayer table {
                                    width: 100%;
                                    height: 100%;
                                }

                                .MacPlayer #playleft {
                                    position: inherit !important;
                                    width: 100%;
                                    height: 100%;
                                }
                            </style>

                            <div class="MacPlayer"><iframe id="buffer" src="" frameborder="0" scrolling="no"
                                    width="100%" height="100%"
                                    style="position: absolute; z-index: 99998; display: none;"></iframe><iframe
                                    id="install" src="" frameborder="0" scrolling="no" width="100%" height="100%"
                                    style="position:absolute;z-index:99998;display:none;"></iframe>
                                <table border="0" cellpadding="0" cellspacing="0">
                                    <tbody>
                                        <tr>
                                            <td id="playleft" valign="top">
                                                <iframe width="100%" height="100%" src="/jzad.html" frameborder="0"
                                                    border="0" marginwidth="0" marginheight="0" scrolling="no"
                                                    allowfullscreen="allowfullscreen"
                                                    mozallowfullscreen="mozallowfullscreen"
                                                    msallowfullscreen="msallowfullscreen"
                                                    oallowfullscreen="oallowfullscreen"
                                                    webkitallowfullscreen="webkitallowfullscreen"></iframe></td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>

                            <div class="macplus-player__jiexi hide">
                                <h3 class="text-center">无法播放，切换如下解析试试</h3>
                                <div class="player_switch clearfix">
                                    {notempty name="data['data']['playerType']"}
                                    {volist name=":putPlayerList($data['data']['playerType'])" id="play" key="kk"
                                    empty="暂无数据"}
                                    {eq name="$play.state" value="on"}
                                    <li class="list">
                                        <a class="btns-info {eq name='$kk' value='1'}active{/eq}" id="{$play.playurl}"
                                            onclick="playerSwitch(this)">{$play.playtitle}</a>
                                    </li>
                                    {/eq}
                                    {/volist}
                                    {else}
                                    <li class="list">
                                        <a class="btns-info" id="" onclick="playerSwitch(this)">暂无播放器</a>
                                    </li>
                                    {/notempty}
                                </div>
                                <h3 class="text-center">选择接口后请点一次【切换解析】按钮，返回播放界面</h3>
                            </div>
                        </div>
                    </div>

                    <div class="col-lg-wide-25 visible-lg hide">
                        <div class="player_side_hd">
                            <div class="player_helper"><span class="helper_btn"><i
                                        class="icon iconfont icon-lights"></i></span></div>
                        </div>
                        {notempty name="data.data.play"}
                        {volist name="data.data.play" id="vod" empty="暂无数据" key="v" length="1"}
                        {/volist}
                        {/notempty}
                        <div class="mod_player_side">
                            <div class="scroll_top">
                                <h2 class="player_title text-overflow">{$data.data.vod_title}</h2>
                                <div class="player_hint">
                                    <span class="player_h2">完结</span>
                                    <div class="details-play-title clearfix">

                                        <ul class="nav nav-tabs">
                                            {notempty name="data.data.play"}
                                            <li class="dropdown mplayer active">
                                                <a href="#" id="myTabDrop2" class="gico {$vod.vod_sign}"
                                                    data-toggle="dropdown">
                                                    <span class="name">{$vod.vod_name}</span>
                                                    <b class="caret"></b>
                                                </a>

                                                <ul class="dropdown-menu" role="menu" aria-labelledby="myTabDrop2">
                                                    {volist name="data.data.play" id="vod" empty="暂无数据" key="v"}
                                                    <li>
                                                        <a class="gico {$vod.vod_sign}"
                                                            href="#con_dplaylist_{$vod.vod_sign}" tabindex="-1"
                                                            data-toggle="tab">
                                                            {$vod.vod_name}
                                                        </a>
                                                    </li>
                                                    {/volist}
                                                </ul>

                                            </li>
                                            {/notempty}
                                        </ul>

                                    </div>
                                </div>
                            </div>
                            <div class="scroll_wrap">
                                <div class="player_playlist macplus-pannel_hd clearfix ">
                                    {notempty name="data.data.play"}
                                    {volist name="data.data.play" id="vod" empty="暂无数据" key="v"}
                                    <ul class="playList macplus-content__playlist column3 fade in  {eq name='$v' value='1'}active{/eq}"
                                        id="con_dplaylist_{$vod.vod_sign}">
                                        {volist name="$vod.data" id="vods" key="kk"}
                                        <li {eq name="$kk" value=":putSelectionsjj($page)" } class="active" {/eq}>
                                            <a data-href="{$vods.vod_url}" onclick="bofang(this)" href="javascript:">
                                                {neq name="$vods.vod_time" value=''}
                                                {$vods.vod_time}<br />
                                                {/neq}
                                                {$vods.vod_name}
                                            </a>
                                        </li>
                                        {/volist}
                                    </ul>
                                    {/volist}
                                    {/notempty}
                                </div>
                            </div>

                        </div>

                    </div>
                    <div class="macplus-player__detail detail clearfix">
                        <ul class="more-btn">
                            <li><a class="btns-info detailjiexi" href="javascript:;">切换解析</a></li>
                            <li><a class="btns-info" href="javascript:;" onclick="window.location.reload()">刷新</a></li>
                            <li><a class="btns-info detailreport" href="javascript:;"
                                    onclick="MAC.Gbook.Report('【ID:{$data.data.id.sign}-名称:{$data.data.vod_title}-第{:putSelectionsjj($page)}集】无法观看请检查修复。页面地址：' + location.href,'{$data.data.id.sign}')">报错</a>
                            </li>
                            <li><a class="btns-info btns-disad" href="?p={:putSelectionsjj($page)-1}">上一集</a></li>
                            <li><a class="btns-info" href="?p={:putSelectionsjj($page)+1}">下一集</a></li>
                        </ul>
                        <h1 class="title"><a href="javascript:">{$data.data.vod_title} <span id="js"></span></a></h1>
                        <p class="data margin-0">
                            <span class="text-muted">类型：</span>
                            {notempty name="data.data.vod_type"}
                            {volist name="data.data.vod_type" id="vod"}
                            {$vod}
                            {/volist}
                            {/notempty}
                            <span class="split-line"></span>
                            <span class="text-muted">地区：</span>
                            {$data.data.vod_region}
                            <span class="split-line"></span>
                            <span class="text-muted">年份：</span>
                            {$data.data.vod_year}
                            <span class="split-line"></span>
                            <a class="detail-mori" href="javascript:;">详情
                                <i class="icon iconfont icon-moreunfold"></i>
                            </a>
                        </p>

                        <div class="detail-content" style="display: none;">
                            <p class="data"><span class="text-muted">导演：</span>未知</p>

                            <p class="data"><span class="text-muted">主演：</span>
                                {notempty name="data.data.vod_actor"}
                                {volist name="data.data.vod_actor" id="vod"}
                                {$vod}
                                {/volist}
                                {/notempty}
                            </p>
                            <p class="data margin-0">
                                <span class="text-muted">简介：</span>
                                {$data.data.vod_desc}
                            </p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="player-mask"></div>
<div class="container" style="transform: none;">
    <div class="row" style="transform: none;">
        <div class="col-lg-wide-75 col-xs-1 macplus-top-1 macplus-lefter"
            style="position: relative; overflow: visible; box-sizing: border-box; min-height: 1px;">




            <div class="theiaStickySidebar"
                style="padding-top: 0px; padding-bottom: 1px; position: static; transform: none;">
                {notempty name="data.data.play"}
                {volist name="data.data.play" id="vod" empty="暂无数据" key="v" length="1"}
                {/volist}
                {/notempty}
                <div class="macplus-play-list hidden-lg block">
                    <div class="details-play-title clearfix">
                        <ul class="nav nav-tabs hidden-xs" id="playTab">

                            <li class="hidden-xs active ">
                                <a class="gico {$vod.vod_sign}" href="#con_playlist_{$vod.vod_sign}" data-toggle="tab">
                                    {$vod.vod_name}
                                </a>
                            </li>

                        </ul>
                        <ul class="nav nav-tabs hidden-sm hidden-md hidden-lg">
                            {notempty name="data.data.play"}
                            <li class="dropdown mplayer active">
                                <a href="#" id="myTabDrop2" class="gico {$vod.vod_sign}" data-toggle="dropdown"><span
                                        class="name">{$vod.vod_name}</span><b class="caret"></b></a>
                                <ul class="dropdown-menu" role="menu" aria-labelledby="myTabDrop2">
                                    {volist name="data.data.play" id="vod" empty="暂无数据" key="v"}
                                    <li>
                                        <a class="gico {$vod.vod_sign}" href="#con_playlist_{$vod.vod_sign}"
                                            tabindex="-1" data-toggle="tab">
                                            {$vod.vod_name}
                                        </a>
                                    </li>
                                    {/volist}
                                </ul>
                            </li>
                            {/notempty}
                            <li class="pull-right">无法播放请切换<span class="text-green">解析</span>或<span
                                    class="text-green">播放源</span>。</li>
                        </ul>
                    </div>
                    <div class="macplus-pannel macplus-pannel-box macplus-pannel-bg">
                        <div class="player_playlist macplus-pannel_hd">
                            {notempty name="data.data.play"}
                            {volist name="data.data.play" id="vod" empty="暂无数据" key="v"}
                            <ul class="playList macplus-content__playlist column8 clearfix fade in {eq name='$v' value='1'}active{/eq}"
                                id="con_playlist_{$vod.vod_sign}">
                                {volist name="$vod.data" id="vods"}
                                <li {eq name="$kk" value=":putSelectionsjj($page)" } class="active" {/eq}>
                                    <a data-href="{$vods.vod_url}" onclick="bofang(this)" href="javascript:">
                                        {neq name="$vods.vod_time" value=''}
                                        {$vods.vod_time}<br />
                                        {/neq}
                                        {$vods.vod_name}
                                    </a>
                                </li>
                                {/volist}
                            </ul>
                            {/volist}
                            {/notempty}
                        </div>
                    </div>
                </div>


                <div class="macplus-pannel macplus-pannel-bg clearfix">
                    <div class="macplus-pannel-box">
                        <div class="macplus-pannel_hd">
                            <div class="macplus-pannel__head clearfix">
                                <h3 class="title">精彩评论</h3>
                            </div>
                        </div>
                        <div class="macplus-pannel_bd">
                            <div class="mac_comment" data-id="21832" data-mid="1">
                                <form class="comment_form">
                                    <input type="hidden" name="comment_pid" value="0">
                                    <ul class="gbook-form clearfix">
                                        <li class="col-xs-1"><textarea class="form-control comment_content"
                                                name="comment_content" placeholder="有事没事说两句..."></textarea></li>
                                        <li class="col-xs-1 col-md-wide-55">
                                            <p class="form-control font-12">温馨提示：您还可以输入<span
                                                    class="comment_remaining remaining">200</span>个字符</p>
                                        </li>
                                        <li class="col-xs-wide-4 col-md-wide-15"><input type="text" name="verify"
                                                class="mac_verify form-control" placeholder="验证码">
                                        </li>
                                        <li class="col-xs-wide-3 col-md-wide-15">
                                            <!-- <img class="mac_verify_img" src="123" data-role="/index.php/verify/index/"
                                                title="看不清楚? 换一张！" onclick="this.src=this.src+'?'"> -->
                                        </li>
                                        <li class="col-xs-wide-3 col-md-wide-15"><input
                                                class="btn btn-primary comment_submit" type="button" value="提交">
                                        </li>
                                    </ul>
                                </form>
                                <div class="macplus-comm-wrap top-line">
                                    <p class="text-center">暂无人评论，快来说两句吧！</p>
                                </div>

                            </div>
                        </div>
                    </div>

                </div>

                {notempty name="data.data.recommend"}
                <div class="macplus-pannel macplus-pannel-bg clearfix">
                    <div class="macplus-pannel-box">
                        <div class="macplus-pannel_hd">
                            <div class="macplus-pannel__head clearfix">
                                <h3 class="title">猜你喜欢</h3>
                            </div>
                        </div>
                        <div class="macplus-pannel_bd">
                            <ul class="macplus-vodlist__bd clearfix">
                                {volist name="data.data.recommend" id="vod" key="kk" }
                                <li class="col-md-5 col-sm-4 col-xs-3">
                                    <div class="macplus-vodlist__bag">
                                        <a class="macplus-vodlist__thumb lazyload"
                                            href="/detail-{:putPlayUrl($data.data.id)}" title="{$vod.vod_name}"
                                            data-original="{$vod.vod_img}"
                                            style="background-image: url({$vod.vod_img});">
                                            <span class="pic-text text-right">{$vod.vod_name}</span></a>
                                        <div class="macplus-vodlist__detail active">
                                            <h4 class="title text-overflow"><a
                                                    href="/detail-{:putPlayUrl($data.data.id)}"
                                                    title="{$vod.vod_name}">{$vod.vod_name}</a></h4>
                                            <p class="text text-overflow text-muted hidden-xs">
                                                {:putVodLabel($vod)}
                                            </p>
                                        </div>
                                    </div>
                                </li>
                                {/volist}
                            </ul>
                        </div>
                    </div>
                </div>
                {/notempty}

            </div>
        </div>
        <div class="col-lg-wide-25 col-xs-1 visible-lg hide macplus-righter"
            style="position: relative; overflow: visible; box-sizing: border-box; min-height: 1px;">

            <div class="theiaStickySidebar"
                style="padding-top: 0px; padding-bottom: 1px; position: static; transform: none;">
                <div class="macplus-pannel macplus-pannel-bg clearfix">
                    <div class="macplus-pannel-box">
                        <div class="macplus-pannel_hd">
                            <div class="macplus-pannel__head clearfix">
                                <h3 class="title">连续剧热播榜</h3>
                            </div>
                        </div>
                        <div class="macplus-pannel_bd">
                            <ul class="macplus-vodlist__media active col-pd clearfix">
                                {notempty name="data.data.recommend"}
                                {volist name="data.data.recommend" id="vod" key="kk" length="1"}
                                <li class="padding-0">
                                    <a class="macplus-vodlist__thumb active lazyload img-shadow"
                                        href="/detail-{$page['vt']}/{$vod.vod_url}" title="{$vod.vod_name}"
                                        data-original="{$vod.vod_img}" style="background-image: url({$vod.vod_img});">
                                        <span class="play-mask hidden-xs">
                                            <em class="play-icon-s"></em>
                                        </span>
                                        <span class="pic-text text-center">{$vod.vod_name}</span>
                                        <span class="pic-tag pic-tag-h">Top1</span>
                                    </a>
                                </li>
                                {/volist}
                                {/notempty}
                            </ul>
                            <ul class="macplus-vodlist__rank col-pd clearfix">

                                {notempty name="data.data.recommend"}
                                {volist name="data.data.recommend" id="vod" key="kk" length="12"}
                                <li class="text-overflow"><a href="/detail-{$page['vt']}/{$vod.vod_url}"
                                        title="{$vod.vod_name}">
                                        {switch name='$kk' }
                                        {case value='1' break='1'}
                                        <span class="badge badge-first">
                                            {/case}
                                            {case value='2' break='2'}
                                            <span class="badge badge-second">
                                                {/case}
                                                {case value='3' break='3'}
                                                <span class="badge badge-third">
                                                    {/case}
                                                    {default /}
                                                    <span class="badge">
                                                        {/switch}{$kk}
                                                    </span>
                                                    {$vod.vod_name}
                                                    <span class="pull-right text-green">{:putVodLabel($vod)}</span>
                                    </a>
                                </li>
                                {/volist}
                                {/notempty}

                            </ul>
                        </div>
                    </div>

                </div>
            </div>
        </div>

        <div class="mac_hits hits hide" data-mid="1" data-id="21832" data-type="hits"></div>
    </div>
</div>


<script type="text/javascript">
    playerSwitch = function (lineIndex) {
        var playurl = $('.playList .active').children('a:eq(0)').attr('data-href');
        $("#playleft iframe").attr("src", lineIndex.id + playurl);
    }

    function bofang(obj) {
        var href = $(obj).attr('data-href');
        var text = $(obj).text();
        $('.js').text(text);
        $.each($('.playList li'), function () {
            $(this).attr('class', '');
        });
        console.log(href, text);
        $(obj).parent().attr('class', 'active');
        var jiekou = $('.list .active').attr('id');
        if (href != '' || href != null) {
            $('#playleft iframe').attr('src', '/jzad.html');
            setTimeout(function () {
                $('#playleft iframe').attr('src', jiekou + href);
            }, 3000)
        }
    }

    $(function () {
        $('#xlus li').children('a:eq(0)').attr('id', 'yss');
        var choice = "{:putSelectionsjj($page)-1}";
        var biaoti = $('#xuji').text();
        var autourl = $('.playList .active').children('a:eq(' + choice + ')').attr('data-href');
        $('.js').text(biaoti);
        var jiekou = $('.list .active').attr('id');
        if (autourl != '' || autourl != null) {
            setTimeout(function () {
                $('#playleft iframe').attr('src', jiekou + autourl);
            }, 3000)
        }
    })
</script>